package com.csk.zsk.compents.entity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.csk.zsk.commons.entity.IdEntity;

@Entity
@Table(name = "CODE")
public class Code extends IdEntity {

	private String name;
	private String codeNo;
	private CodeGroup codeGroup;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCodeNo() {
		return codeNo;
	}

	public void setCodeNo(String codeNo) {
		this.codeNo = codeNo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "group_id")
	public CodeGroup getCodeGroup() {
		return codeGroup;
	}

	public void setCodeGroup(CodeGroup codeGroup) {
		this.codeGroup = codeGroup;
	}

}
